package cn.zjutleo.village_server.controller;

import cn.zjutleo.village_server.entity.RepairTeam;
import cn.zjutleo.village_server.mapper.RepairTeamMapper;
import cn.zjutleo.village_server.service.RepairTeamService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;

/**
 * @author : Fu Lantian
 * @date : Created in 2021/11/17
 * @Description: 该类用于 TODO
 */
@Api(tags="维修人员查询")
@RestController()
public class RepairTeamController {
    @Autowired
    RepairTeamService repairTeamService;

    @ApiOperation("按照部门id查询维修人员")
    @PostMapping("/api/getRepairTeamInfoByDepartmentId")
    List<RepairTeam> getDepartmentMemberInfoById(@RequestBody HashMap<String ,String > map){
        return repairTeamService.searchRepairTeamInfoByDepartmentId(Integer.valueOf(map.get("dm_department_id")));
    }
}
